home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / canvasmode_nodeedit.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-09-23  |  2.0 KB  |  71 lines

  1. /*
  2.  For general Scribus (>=1.3.2) copyright and licensing information please refer
  3.  to the COPYING file provided with the program. Following this notice may exist
  4.  a copyright and/or license notice that predates the release of Scribus 1.3.2
  5.  for which a new license (GPL+exception) is in place.
  6.  */
  7. /***************************************************************************
  8. *                                                                         *
  9. *   This program is free software; you can redistribute it and/or modify  *
  10. *   it under the terms of the GNU General Public License as published by  *
  11. *   the Free Software Foundation; either version 2 of the License, or     *
  12. *   (at your option) any later version.                                   *
  13. *                                                                         *
  14. ***************************************************************************/
  15.  
  16.  
  17.  
  18. #ifndef CANVAS_MODE_NODEEDIT_H
  19. #define CANVAS_MODE_NODEEDIT_H
  20.  
  21. #include "canvasmode.h"
  22.  
  23. #include <QMatrix>
  24. #include <QRect>
  25.  
  26. class PageItem;
  27. class RectSelect;
  28. class ScribusMainWindow;
  29.  
  30. class SCRIBUS_API CanvasMode_NodeEdit : public CanvasMode
  31. {
  32. public:
  33.     CanvasMode_NodeEdit (ScribusView* view);
  34.     
  35.     virtual void activate(bool fromgesture);
  36.     virtual void deactivate(bool forGesture);
  37.     
  38.     virtual void enterEvent(QEvent *);
  39.     virtual void leaveEvent(QEvent *);
  40.     
  41.     virtual void mouseDoubleClickEvent(QMouseEvent *m);
  42.     virtual void mouseReleaseEvent(QMouseEvent *m);
  43.     virtual void mouseMoveEvent(QMouseEvent *m);
  44.     virtual void mousePressEvent(QMouseEvent *m);
  45.  
  46.     
  47.     /**
  48.         Draws the controls for this mode
  49.      */
  50.     virtual void drawControls(QPainter* p);
  51.     
  52.     
  53.     virtual ~CanvasMode_NodeEdit() {};
  54.     
  55.     
  56. private:
  57.     inline bool GetItem(PageItem** pi); 
  58.     void handleNodeEditPress(QMouseEvent*, QRect);
  59.     void handleNodeEditDrag(QMouseEvent*, PageItem*);
  60.     bool handleNodeEditMove(QMouseEvent*, QRect, PageItem*, QMatrix);
  61.     
  62.     ScribusMainWindow* m_ScMW;
  63.     
  64.     RectSelect* m_rectangleSelect;
  65.     int Mxp, Myp, Dxp, Dyp, SeRx, SeRy, GxM, GyM;
  66.     bool MoveGX, MoveGY;
  67. };
  68.  
  69.  
  70. #endif
  71.